package com.yowasa.xiuxian.engine.item.lingyao;

import com.yowasa.xiuxian.annoations.Item;
import com.yowasa.xiuxian.engine.item.ItemInterface;
import com.yowasa.xiuxian.entity.bo.user.UserBO;
import com.yowasa.xiuxian.entity.enums.ItemTypeEnum;

@Item(name = "天道神丹", type = ItemTypeEnum.LING_YAO, price = 30000)
public class TianDaoShenDan implements ItemInterface {

    @Override
    public String desc() {
        return "降低道行，获得巨额历练";
    }

    @Override
    public String effect(UserBO userBO) {
        int ability = userBO.getUserConfig().getAbility();
        ability = ability >= 10 ? ability - 10 : 0;
        userBO.getUserConfig().setAbility(ability);
        userBO.getUserConfig().setTravel(userBO.getUserConfig().getTravel() + 50000);
        return "你的道行降低了，获得了大量历练";
    }



}
